import { Sentence } from 'src/app/model/sentence';

export class GetSentences {
  static readonly type = '[Sentence] Get';
  constructor(public payload: number = 0) {} //payload is relative value with the current chapter no
}

export class AddSentence {
  static readonly type = '[Sentence] Add';
  constructor(public payload: string) {}
}
export class UpdateSentence {
  static readonly type = '[Sentence] Update';
  constructor(public payload: Sentence) {}
}
export class DeleteSentence {
  static readonly type = '[Sentence] Delete';
  constructor(public payload: string) {}
}
export class GetUserInfo {
  static readonly type = '[UserInfo] Get';
}

export class UpdateUserInfo {
  static readonly type = '[UserInfo] Update';
}

export class SwitchAutoPlaying {
  static readonly type = '[AutoPlaying] Switch';
  constructor(public payload: boolean) {}
}
export class UpdateWaitTime {
  static readonly type = '[WaitTime] Update';
  constructor(public payload: number) {}
}
export class UpdateChapterNo {
  static readonly type = '[ChapterNo] Update';
  constructor(public payload: number) {}
}
export class UpdateSequenceNo {
  static readonly type = '[SequenceNo] Update';
  constructor(public payload: number) {}
}

export class Login {
  static readonly type = '[App] Login';
  constructor(public payload: { email: string; password: string }) {}
}
export class Logout {
  static readonly type = '[App] Logout';
}
